<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="/ceca_two/lib/layui/css/layui.css"  media="all">
	<style type="text/css">
		.layui-form-checked span, .layui-form-checked:hover span{
			background-color:#FF0000!important;
			}
			#demoBtn{
				background-color: #FF0000;
			}
			.layui-form-checked i, .layui-form-checked:hover i {
			    color: #ff0000!important;
			}
			.layui-form-checked, .layui-form-checked:hover {
			    border-color: #ff0000!important;
			}
	</style>
</head>
<body  style="margin-left:auto;margin-right:auto;width: 80%;">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 10px;">
<legend>意见反馈</legend>
</fieldset>
<form class="layui-form layui-form-pane" action="" >
  <div class="layui-form-item">
    <label class="layui-form-label">问题类型:</label>
    <div class="layui-input-block">
      <input type="checkbox" name="数据纠错" title="数据纠错"  >
      <input type="checkbox" name="功能建议" title="功能建议"  >
      <input type="checkbox" name="其他" title="其他"  >
    </div>
  </div>
  <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">反馈内容:</label>
    <div class="layui-input-block">
      <textarea placeholder="写点东西吧，我们希望听到您的声音^_^" class="layui-textarea"></textarea>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">联系方式:</label>
    <div class="layui-input-block">
      <input type="text" name="link" id="link" autocomplete="off" placeholder="请留下联系方式，以便我们及时联系您" class="layui-input">
    </div>
  </div>
  <div class="layui-form-item" style="margin-top: 100px; margin-left:auto;margin-right:auto;width: 10%;">
    <button class="layui-btn" lay-submit="" lay-filter="demo2" id="demoBtn">提交</button>
  </div>
</form>
          
<script src="/ceca_two/lib/layui/layui.js"></script>
<script>
layui.use(['form', 'layedit', 'laydate'], function(){
  var form = layui.form
  ,layer = layui.layer;
  var $ =layui.jquery;
  
  $("form").submit(function(e){
	e.preventDefault();
	var data={};
	data.type="";
	$.each($('input:checkbox:checked'),function(){
		data.type += $(this).attr("name")+";";
    });
    data.content=$('textarea').val();
    data.link= $('#link').val();
    $.post("/guidance_service/front/facdback/add.do",data,function(rlt){
//  	if(rlt.){
//  		
//  	}
    	layer.alert("提交成功",function(){
    		var index = parent.layer.getFrameIndex(window.name); 
    		parent.layer.close(index);
    	})
    	
    });
    
  });
});
</script>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?1c487e541b5a7a8cfbc2524a4a77512c";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
</body>
</html>